#ifndef CELL_H
#define CELL_H

#include <QObject>

class Piece;

class Cell : public QObject
{
    Q_OBJECT
public:
    explicit Cell(int x, int y, QObject *parent = nullptr) : x(x), y(y){setParent(parent);}
    int getX(){return x;}
    int getY(){return y;}
    int getCoordX(){return (x-1)*64;}
    int getCoordY(){return (8-y)*64;}
    void setPiece(Piece *piece);
    Piece* getPiece();
    bool hasPiece();
    inline bool operator ==(const Cell& cell){return x == cell.x && y == cell.y;}
private:
    int x, y;
    Piece *piece = nullptr;
signals:

};

#endif // CELL_H
